<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    .active{
        color: red;
    }
  </style>
</head>
<body>
<script src="../js/vue.js"></script>
<div id="app">
  <ul>
<!--一个列表展示，点击哪个列表就显示红色-->
    <li v-for="(item,index) in movies" :class="{active:index==currIndex}" @click="btn(index)">{{item}}</li>
  </ul>
</div>
<script>
    const app = new Vue({
        el:'#app',
        data:{
            movies:['送你一朵小红花','除暴','沐浴之王','拆弹专家2','温暖的抱抱'],
          currIndex:-1
        },
      methods:{
         btn(index){
           this.currIndex = index
         }
      }

    })
</script>

</body>
</html>